package com.practise.coffee.service;

import com.practise.coffee.dao.MakeDao;
import com.practise.coffee.entity.coffee.TargetCoffee;
import com.practise.coffee.entity.other.Milk;
import com.practise.coffee.entity.other.Suger;
import com.practise.coffee.enums.CoffeeType;
import com.practise.coffee.util.ClassUtil;

/**
 * https://mp.weixin.qq.com/s?__biz=MzA5Mzg0OTgwMA==&mid=2654440984&idx=1&sn=36ab9ab8eb4b858c8ce1933499b8cf3e&scene=23&srcid=0708dPx5mZ0wcjHlGR1uYXAv#rd
 */

public class CoffeeMaker {

	MakeDao makeDao;

	public CoffeeMaker() {
	}

	/**
	 * 摩卡咖啡制作
	 */
	public TargetCoffee makeMocha() {
		makeDao = ClassUtil.getDao(CoffeeType.MOCHA);
		makeDao.pouringCoffeePowder();
		makeDao.pouringWater(30);
		makeDao.addMaterial(new Suger());

		return makeDao.makeSuccess();
	}

	/**
	 * 摩卡咖啡制作
	 */
	public TargetCoffee makeCappuccino() {

		makeDao = ClassUtil.getDao(CoffeeType.CAPPUCCINO);

		makeDao.pouringCoffeePowder();
		makeDao.pouringWater(100);
		makeDao.addMaterial(new Milk());

		return makeDao.makeSuccess();
	}
}
